3.43 \(\int \frac {(-1+x^2)^3}{(1+x^2)^4} \, dx\)

Optimal. Leaf size=34 \[ -\frac {x \left (1-x^2\right )^2}{3 \left (x^2+1\right )^3}-\frac {2 x}{3 \left (x^2+1\right )} \]

[Out]

-1/3*x*(-x^2+1)^2/(x^2+1)^3-2/3*x/(x^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {413, 21, 383} \[ -\frac {x \left (1-x^2\right )^2}{3 \left (x^2+1\right )^3}-\frac {2 x}{3 \left (x^2+1\right )} \]

Antiderivative was successfully verified.

[In]

Int[(-1 + x^2)^3/(1 + x^2)^4,x]

[Out]

-(x*(1 - x^2)^2)/(3*(1 + x^2)^3) - (2*x)/(3*(1 + x^2))

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 383

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(c*x*(a + b*x^n)^(p + 1))/a, x]
 /; FreeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a*d - b*c*(n*(p + 1) + 1), 0]

Rule 413

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[((a*d - c*b)*x*(a + b*x^n)^
(p + 1)*(c + d*x^n)^(q - 1))/(a*b*n*(p + 1)), x] - Dist[1/(a*b*n*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)
^(q - 2)*Simp[c*(a*d - c*b*(n*(p + 1) + 1)) + d*(a*d*(n*(q - 1) + 1) - b*c*(n*(p + q) + 1))*x^n, x], x], x] /;
 FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[q, 1] && IntBinomialQ[a, b, c, d, n, p, q
, x]

Rubi steps

\begin {align*} \int \frac {\left (-1+x^2\right )^3}{\left (1+x^2\right )^4} \, dx &=-\frac {x \left (1-x^2\right )^2}{3 \left (1+x^2\right )^3}+\frac {1}{6} \int \frac {\left (-1+x^2\right ) \left (4+4 x^2\right )}{\left (1+x^2\right )^3} \, dx\\ &=-\frac {x \left (1-x^2\right )^2}{3 \left (1+x^2\right )^3}+\frac {2}{3} \int \frac {-1+x^2}{\left (1+x^2\right )^2} \, dx\\ &=-\frac {x \left (1-x^2\right )^2}{3 \left (1+x^2\right )^3}-\frac {2 x}{3 \left (1+x^2\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 24, normalized size = 0.71 \[ -\frac {x \left (3 x^4+2 x^2+3\right )}{3 \left (x^2+1\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(-1 + x^2)^3/(1 + x^2)^4,x]

[Out]

-1/3*(x*(3 + 2*x^2 + 3*x^4))/(1 + x^2)^3

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 33, normalized size = 0.97 \[ -\frac {3 \, x^{5} + 2 \, x^{3} + 3 \, x}{3 \, {\left (x^{6} + 3 \, x^{4} + 3 \, x^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-1)^3/(x^2+1)^4,x, algorithm="fricas")

[Out]

-1/3*(3*x^5 + 2*x^3 + 3*x)/(x^6 + 3*x^4 + 3*x^2 + 1)

________________________________________________________________________________________

giac [A]  time = 0.58, size = 20, normalized size = 0.59 \[ -\frac {3 \, {\left (x + \frac {1}{x}\right )}^{2} - 4}{3 \, {\left (x + \frac {1}{x}\right )}^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-1)^3/(x^2+1)^4,x, algorithm="giac")

[Out]

-1/3*(3*(x + 1/x)^2 - 4)/(x + 1/x)^3

________________________________________________________________________________________

maple [A]  time = 0.01, size = 23, normalized size = 0.68 \[ \frac {-x^{5}-\frac {2}{3} x^{3}-x}{\left (x^{2}+1\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2-1)^3/(x^2+1)^4,x)

[Out]

(-x^5-2/3*x^3-x)/(x^2+1)^3

________________________________________________________________________________________

maxima [A]  time = 1.32, size = 33, normalized size = 0.97 \[ -\frac {3 \, x^{5} + 2 \, x^{3} + 3 \, x}{3 \, {\left (x^{6} + 3 \, x^{4} + 3 \, x^{2} + 1\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^2-1)^3/(x^2+1)^4,x, algorithm="maxima")

[Out]

-1/3*(3*x^5 + 2*x^3 + 3*x)/(x^6 + 3*x^4 + 3*x^2 + 1)

________________________________________________________________________________________

mupad [B]  time = 5.00, size = 31, normalized size = 0.91 \[ \frac {4\,x}{3\,{\left (x^2+1\right )}^2}-\frac {x}{x^2+1}-\frac {4\,x}{3\,{\left (x^2+1\right )}^3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2 - 1)^3/(x^2 + 1)^4,x)

[Out]

(4*x)/(3*(x^2 + 1)^2) - x/(x^2 + 1) - (4*x)/(3*(x^2 + 1)^3)

________________________________________________________________________________________

sympy [A]  time = 0.13, size = 31, normalized size = 0.91 \[ \frac {- 3 x^{5} - 2 x^{3} - 3 x}{3 x^{6} + 9 x^{4} + 9 x^{2} + 3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**2-1)**3/(x**2+1)**4,x)

[Out]

(-3*x**5 - 2*x**3 - 3*x)/(3*x**6 + 9*x**4 + 9*x**2 + 3)

________________________________________________________________________________________